﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WPFEdit.Document.Factory
{
	/// <summary>
	/// Specifies this class can read all of the file extentions in the
	/// File extensions parameter.
	/// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class DocumentReaderAttribute : System.Attribute
    {
        public readonly String[] FileExtensions;

        public DocumentReaderAttribute(String[] fileExtensions)
        {
            FileExtensions = fileExtensions;
        }
    }

	/// <summary>
	/// Specified this class can write a certain type. The boolean flag
	/// indicates that this can also write subclasses of the type.
	/// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class DocumentWriterAttribute : System.Attribute
    {
        public readonly Type DocumentDataType;
        public readonly bool WritesSubclasses;

        public DocumentWriterAttribute(Type dataType, bool writesSubClasses)
        {
            DocumentDataType = dataType;
            WritesSubclasses = writesSubClasses;
        }
    }

	/// <summary>
	/// Specified this class can edit a certain type. The boolean flag
	/// indicates that this can also edit subclasses of the type.
	/// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class DocumentEditorAttribute : System.Attribute
    {
        public readonly Type DocumentDataType;
        public readonly bool EditsSubclasses;

        public DocumentEditorAttribute(Type dataType, bool editsSubclasses)
        {
            DocumentDataType = dataType;
            EditsSubclasses = editsSubclasses;
        }
    }
}
